<?php

namespace frontend\modules\activity\models;

use Yii;
use common\helpers\Url;
use common\logics\PositionLogic;

/**
 * 精选活动面板
 *
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class CareDashboardLogic extends \common\logics\DashboardLogic {

    /**
     * @var string 精选活动背景图
     */
    public $background = '';

    /**
     * @var array 精选活动轮播图
     */
    public $broadcast = [];

    /**
     * 精选活动背景图
     * @inheritdoc
     */
    protected function setBackground() {
        return Url::attach('assets/bg/activity/care.jpg');
    }

    /**
     * 精选活动轮播图
     * @inheritdoc
     */
    protected function setBroadcast() {
        return PositionLogic::findByName('activity.care.broadcast', []);
    }

}
